package com.tuoren.forward.init;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.Ordered;
import org.springframework.stereotype.Component;

import com.tuoren.forward.config.amqp.AmqpClient1;
import com.tuoren.forward.config.amqp.AmqpClient2;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@Component
public class AmqpInit implements ApplicationRunner,Ordered{

	@Autowired
	AmqpClient1 amqpClient1; 
	
	@Autowired
	AmqpClient2 amqpClient2; 
	
	@Override
	public void run(ApplicationArguments args) throws Exception {
		// TODO Auto-generated method stub
		log.info("Amqp初始化>>>");
		amqpClient1.connection();
		amqpClient2.connection();
	}

	@Override
	public int getOrder() {
		// TODO Auto-generated method stub
		return 1;
	}

}
